// import { clipboard } from '@ve/utils/clipboard'
// import { jsonToTable } from '@ve/utils/jsonToTable'

import isEmpty from 'lodash/isEmpty'
// import { Toast } from 'vant'

//必须带done回调 执行完成调用
export default function pdaGetInputData({ vm, action, additionalData, done }) {
  //
  console.log('获取输入框数据', vm, action, additionalData, '结束')

  let { useInpData } = action.extension
  // let _data = {}
  let _resData = {}

  if (useInpData.value) {
    if (isEmpty(additionalData)) {
      let moduleId = vm.info._id
      if (vm.vuiComponents[moduleId]) {
        _resData = {
          [vm.vuiComponents[moduleId].self.info.extension.model.value]: vm.vuiComponents[moduleId].self.formDataModel,
        }
      } else {
        console.log('暂未找到该组件')
      }
    }
  }
  console.log('输入框的值', _resData)
  done(null, _resData)
}
